<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<script>

/*
*    ES6 新增了let命令，用来声明变量。它的用法类似于var，但是所声明的变量，只在let命令所在的代码块内有效。   
*
*/ 
    {
        let a = 10;
        var b = 1;
    }
    console.log(b);
    console.log(a);//Uncaught ReferenceError: a is not defined at a.html:15


    
    
</script>
</body>
</html>